
from selenium.webdriver.common.alert import Alert
from selenium.webdriver.common.by import By
from pages.base_page import BasePage
class CommercialCountPage(BasePage):
    """商机统计页面的操作"""
    click_trend_day_count_locator=(By.CSS_SELECTOR,'#show_day')
    click_commercial_count_picture_locator=(By.CSS_SELECTOR,'#show_status')


    def click_trend_day_count(self):
        """点击日趋势统计"""
        self.driver.find_element(*self.click_trend_day_count_locator).click()


    def click_sale_funnel_count(self):
        """点击商机统计漏斗图"""
        self.driver.find_element(*self.click_commercial_count_picture_locator).click()


    def get_business_count_url(self):
        """获取商机统计页面url"""
        return self.current_url()